package com.fei.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @ Package com.fei.exception
 * @ Author  费小钢
 * @ Date 2025/7/20 13:14
 * @ Description:
 * @ Version v1.0
 * @ Copyright @2025-2027 云图一然
 **/
@EqualsAndHashCode(callSuper = true)
@Data
public class BaseException extends Exception{
    private Integer code;
    private String message;
    public BaseException(Integer code, String message){
        this.code = code;
        this.message = message;
    }
    public BaseException() {

    }
    public BaseException(ErrorType errorType){
        this.code = errorType.getCode();
        this.message = errorType.getMessage();
    }
}
